﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using V = Science.Mathematics.VectorCalculus;

namespace VectorCalculus5Ed.Chapter1.Section1
{
    public class Example14
    {
        public Example14()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
            V.Point p = new V.Point(3);
            p[0] = 2.0;
            p[1] = 1.0;
            p[2] = -3.0;

            V.Point q = new V.Point(3);
            q[0] = 6.0;
            q[1] = -1.0;
            q[2] = -5.0;

            V.Line l = new V.Line(p, q);
            l.Parameter = 2.0;
         
            V.Vector v3 = l.GetVectorOnLine();

            result += v3[0].ToString() + "   " +
                v3[1].ToString() + "   " + v3[2].ToString() + "\r\n";

            double x = 2.0 + 4.0 * 2.0;
            double y = 1.0 - 2.0 * 2.0;
            double z = -3.0 - 2.0 * 2.0;
            result += x.ToString() + "   " +
               y.ToString() + "   " + z.ToString() + "\r\n";
         }
    }
}

// 10   -3   -7
// 10   -3   -7
